package com.bluemsun.answerapp.dto;


import com.bluemsun.answerapp.enums.ExportStateEnum;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xwpf.usermodel.XWPFDocument;

import java.util.List;

public class ExportExecution {
    // 结果状态
    private int state;

    // 状态标识
    private String stateInfo;

    private HSSFWorkbook hssfWorkbook;

    public XWPFDocument getDocument() {
        return document;
    }

    public void setDocument(XWPFDocument document) {
        this.document = document;
    }

    private XWPFDocument document;
    private List<HSSFWorkbook> hssfWorkbookList ;

    public ExportExecution() {
    }

    // 失败的构造器

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public HSSFWorkbook getHssfWorkbook() {
        return hssfWorkbook;
    }

    public void setHssfWorkbook(HSSFWorkbook hssfWorkbook) {
        this.hssfWorkbook = hssfWorkbook;
    }

    public List<HSSFWorkbook> getHssfWorkbookList() {
        return hssfWorkbookList;
    }

    public void setHssfWorkbookList(List<HSSFWorkbook> hssfWorkbookList) {
        this.hssfWorkbookList = hssfWorkbookList;
    }

    public ExportExecution(ExportStateEnum stateEnum) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
    }

    // 成功的构造器
    public ExportExecution(ExportStateEnum stateEnum, HSSFWorkbook hssfWorkbook, XWPFDocument document) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.hssfWorkbook = hssfWorkbook;
        this.document=document;
    }

    // 成功的构造器
    public ExportExecution(ExportStateEnum stateEnum, List<HSSFWorkbook> hssfWorkbookList) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.hssfWorkbookList = hssfWorkbookList;
    }


}
